<!DOCTYPE HTML>
<html>
    <head>
         <meta charset="utf-8"/>
        <title>read and update cookie</title>
        <meta name="auther" content="wangjiale"/>
        <meta name="description" content="A simper example"/>
        <style>
            pre{border:medium solid black;}
        </style>
    </head>
    <body>
        <pre id="results"></pre>
        <img id="lemon" name="image" src="lemom.png" alt="lemon"/>
        <p>
            There are lots of different kinds of fruil-there are over 500 
            varieties of banana alone. By the time we add the countless 
            types of apples,oranges,and other well-known fruit,we are faced with thousands of choices.
        </p>
        <img id="apple" name="image" src="apple.png" alt="apple"/>
        <p>
            There are lots of different kinds of fruil-there are over 500 
            varieties of banana alone. By the time we add the countless 
            types of apples,oranges,and other well-known fruit,we are faced with thousands of choices.
        </p>
        <img id="banana" name="image" src="banana-small.png" alt="banana-small"/>
    </body>
    <script>
        var resultsElement=document.getElementById("results");
        var elems=document.images;
        for(var i=0;i<elems.length;i++){
            resultsElement.innerHTML+="image Element:"+elems[i].id+"\n";
        }
        var srcValue=elems.namedItem("apple").src;
        resultsElement.innerHTML+="Src for apple elemnt is:"+srcValue+"\n";
    </script>
</html>